﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="caedisi.Views.NeighbourhoodDefinition"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" VerticalAlignment="Stretch"
    xmlns:Helpers="clr-namespace:caedisi.Helpers"
    >

    <UserControl.Resources>       
        <Helpers:GlobalVariableProvider x:Key="GlobalVariableProvider" />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" VerticalAlignment="Stretch">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="20" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Button Content="Add a new neighbourhood definition" Height="23" HorizontalAlignment="Left" Name="button1" VerticalAlignment="Top" Click="buttonAddNewNeighbourhoodDefinition_Click" Margin="0,0,0,20" />
        <sdk:DataGrid Grid.Row="1" AutoGenerateColumns="True" ItemsSource="{Binding Source={StaticResource GlobalVariableProvider}, Path=GlobalVariables.Lovs.NeighbourhoodTypes, Mode=TwoWay}" VerticalAlignment="Stretch" />

        <StackPanel HorizontalAlignment="Center" Grid.Row="3" Orientation="Horizontal">
            <Button x:Name="CancelButton" Content="Cancel"  Width="75" Height="23"  />
            <Button x:Name="SaveButton" Content="Save"  Width="75" Height="23"  />
        </StackPanel>
        
    </Grid>
</UserControl>
